/**
 * Created with BlueStream
 * Date: 13. 5. 31
 * Time: 오전 9:46
 * Writer: 강석민
 */

var boxLength = 103;

function drawBox(){
    var str = "";

    var i = 0;
    var len = boxLength;
    while( i < len ){
        str += '<div id="box'+i+'" class="box" style="left">'+i+'</div>';
        ++i
    }
    document.getElementById('wrap').innerHTML+=str;


}

function updatadisplay(){

    var boxStyle;
    var i = 0;
    var len = boxLength;
    while( i < len ){
        boxStyle = document.getElementById("box"+i).style;
        boxStyle.left = (i*100)+"px";
        ++i
    }
}

window.onload = function(){
    drawBox();
    updatadisplay();
}